import re
import sys
import os


file_path = os.path.abspath(__file__)
pp_dir = "/".join(re.split("[/|\\\]", file_path)[:-3])
sys.path.append(pp_dir)
import platgo as pg
# __package__ = 'demo.sogo'
# from .Ackley import Ackley

problem = pg.problems.Ackley(30)

N = 200
# population = pg.Population(N, '111')  # 实例化种群，在算法模板里会初始化

maxgen = 1000
Algorithm = pg.algorithms.sogo_DE(N=N, maxgen=maxgen, problem=problem)

pop = Algorithm.go()

print(pop)
Algorithm.draw()


